<div id="mmrfld">
	<h2><?php __('Manualmoves READY FOR LETTER DELIVERY');?></h2>
	<table cellpadding="0" cellspacing="0" width="100%">
	<tr>
			<th width="100">&nbsp;Batch</th>
			<th width="120">&nbsp;Account</th>
			<th width="250">&nbsp;MAC</th>
			<th width="250">&nbsp;Last update</th>
			<th>&nbsp;Status</th>
	</tr>
	<?php
	$i = 0;
	$counter = 0;
	foreach ($mmrfld as $rfld):
		$class = null;
		if ($i++ % 2 == 0) {
			$class = ' class="altrow"';
		}
		else {
			$class = ' class="altrow2"';
		}
	?>
	<tr<?php echo $class;?>>
	    <td>&nbsp;<?php echo $rfld['rhm']['run_id']; ?></td>
		<td>&nbsp;<?php echo $rfld['customer']['account_number']; ?></td>
		<td>&nbsp;<?php echo $rfld['mac']['mac']; ?></td>
		<td>&nbsp;<?php echo $rfld['mms']['date']; ?></td>
		<td>&nbsp;<?php echo $rfld['status']['statusdetail']; ?></td>
	</tr>
	<?php $counter++; ?>
	<?php endforeach; ?>
	</table>
	<?php if($counter != 0){ ?>
	<?php echo $this->Html->link('Download customer data for letter delivery',array('controller' => 'manualmoves', 'action' => 'export'));?>
	<br /><br />
	<?php echo $ajax->form(array('type' => 'post','options' => array('model'=>'Manualmove','update' => 'mmrfld', 'url' => array('controller' => 'manualmoves','action' => 'mmrfld')))); ?> 
      Timeblocker till: 
      <select name="data[Manualmove][date]" id="ManualmoveDate" style="width:150px">
		<?php $time = mktime(6, 0, 0, date(m), date(d), date(Y)); ?>
		<option value="<?php echo $time+(1*86400); ?>"><?php echo date("d.m.Y",$time+(1*86400))." - ".date("D",$time+(1*86400)); ?></option>
		<option value="<?php echo $time+(2*86400); ?>"><?php echo date("d.m.Y",$time+(2*86400))." - ".date("D",$time+(2*86400)); ?></option>
		<option value="<?php echo $time+(3*86400); ?>" selected><?php echo date("d.m.Y",$time+(3*86400))." - ".date("D",$time+(3*86400)); ?></option>
		<option value="<?php echo $time+(4*86400); ?>"><?php echo date("d.m.Y",$time+(4*86400))." - ".date("D",$time+(4*86400)); ?></option>
		<option value="<?php echo $time+(5*86400); ?>"><?php echo date("d.m.Y",$time+(5*86400))." - ".date("D",$time+(5*86400)); ?></option>
		<option value="<?php echo $time+(6*86400); ?>"><?php echo date("d.m.Y",$time+(6*86400))." - ".date("D",$time+(6*86400)); ?></option>
		<option value="<?php echo $time+(7*86400); ?>"><?php echo date("d.m.Y",$time+(7*86400))." - ".date("D",$time+(7*86400)); ?></option>
		<option value="<?php echo $time+(8*86400); ?>"><?php echo date("d.m.Y",$time+(8*86400))." - ".date("D",$time+(8*86400)); ?></option>
		<option value="<?php echo $time+(9*86400); ?>"><?php echo date("d.m.Y",$time+(9*86400))." - ".date("D",$time+(9*86400)); ?></option>
		<option value="<?php echo $time+(10*86400); ?>"><?php echo date("d.m.Y",$time+(10*86400))." - ".date("D",$time+(10*86400)); ?></option>
	  </select>
      <input type="submit" value="SEND letters for all Manual Moves">
    </form>
    <?php } ?>
	<br />
	</div>